<?php

// uncomment the following to define a path alias
// Yii::setPathOfAlias('local','path/to/local-folder');

// This is the main Web application configuration. Any writable
// CWebApplication properties can be configured here.
Yii::setPathOfAlias('bootstrap', dirname(__FILE__) . '/../extensions/bootstrap');
return array(
    'basePath' => dirname(__FILE__) . DIRECTORY_SEPARATOR . '..',
    'name' => 'Event Booking',
    'theme' => 'default',

    // preloading 'log' component
    'preload' => array('log'),
    // autoloading model and component classes
    'import' => array(
        'application.models.*',
        'application.components.*',
        'application.extensions.CBreadcrumbs.Cbreadcrumbs',
        'application.extensions.EPhpThumb.*',
        'application.extensions.yiisortablemodel.models.*',
        'application.extensions.yiisortablemodel.behaviors.*',
        'application.extensions.yii-mail.*',
        // 'ext.mongodbext.*'
    ),

    'modules' => array(
        // uncomment the following to enable the Gii tool

        'gii' => array(
            'class' => 'system.gii.GiiModule',
            'password' => '123',
            // If removed, Gii defaults to localhost only. Edit carefully to taste.
            'ipFilters' => array('127.0.0.1', '::1'),
        ),
        'bookingsystem'
    ),

    // application components
    'components' => array(
        'user' => array(
            'allowAutoLogin' => true,
            'class' => 'WebUser',
            'loginUrl' => array('/autozoomsystem/site/login'),
        ),
        // uncomment the following to enable URLs in path-format

        'urlManager' => array(
            'urlFormat' => 'path',
            'showScriptName' => false,
            'caseSensitive' => false,
            'rules' => array(
                '<controller:\w+>/<id:\d+>' => '<controller>/view',
                '<controller:\w+>/<action:\w+>/<id:\d+>' => '<controller>/<action>',
                '<controller:\w+>/<action:\w+>' => '<controller>/<action>',
            ),
        ),
        'facebook' => array(
            'class' => 'ext.yii-facebook-opengraph.SFacebook',
            'appId' => '272631272881553',
            'secret' => '17e8c8534e7819c430c47245084d44e9',
            'status' => false,
        ),
        'bootstrap' => array(
            'class' => 'bootstrap.components.Bootstrap',
        ),
        // 'db'=>array(
        // 	'connectionString' => 'sqlite:'.dirname(__FILE__).'/../data/testdrive.db',
        // ),
        // 'mongodb' => array(
        // 	'class'            => 'EMongoDB',
        // 	'connectionString' => 'mongodb://xuanhong:ngoctram0111.mongolab.com:31347/booking',
        // 	'dbName'           => 'booking',
        // 	'fsyncFlag'        => true,
        // 	'safeFlag'         => true,
        // 	'useCursor'        => false
        // 	),
        // 'mongodb2' => array(
        // 	'class' 		   => 'EMongoDB',
        // 	'connectionString' => 'mongodb://xuanhong:ngoctram0111.mongolab.com:31347/booking_bootrap',
        // 	'dbName'           => 'booking_bootrap',
        // 	'fsyncFlag'        => true,
        // 	'safeFlag'         => true,
        // 	'useCursor'        => false
        // 	),
        // uncomment the following to use a MySQL database

        'setting' => array(
            'class' => 'application.extensions.MyConfig.MyConfig',
            'cacheId' => null,
            'useCache' => false,
            'cacheTime' => 0,
            'tableName' => 'settings',
            'createTable' => false,
            'loadDbItems' => true,
            'serializeValues' => true,
            'configFile' => '',
        ),

        'mail' => array(
            'class' => 'application.extensions.yii-mail.YiiMail',
            'transportType' => 'smtp', /// case sensitive!
            'transportOptions' => array(
                'host' => 'smtp.gmail.com',
                'username' => 'hong.taxuan@gmail.com',
                'password' => 'tranngoctram',
                'port' => '465',
                'encryption' => 'tls',
                'timeout' => '200',
            ),
            'viewPath' => 'application.mail',
            'logging' => true,
            'dryRun' => false
        ),

        'db' => array(
            'connectionString' => 'mysql:host=localhost;dbname=booking',
            'emulatePrepare' => true,
            'username' => 'root',
            'password' => '',
            'charset' => 'utf8',
        ),
        // 'db2'=>array(
        // 	'connectionString' => 'mysql:host=localhost;dbname=booking_bootstrap',
        // 	'emulatePrepare' => true,
        // 	'username' => 'root',
        // 	'password' => '',
        // 	'charset' => 'utf8',
        // ),
        'errorHandler' => array(
            // use 'site/error' action to display errors
            'errorAction' => 'site/error',
        ),
        'log' => array(
            'class' => 'CLogRouter',
            'routes' => array(
                array(
                    'class' => 'CFileLogRoute',
                    'levels' => 'error, warning',
                ),
                // uncomment the following to show log messages on web pages
                /*
                array(
                    'class'=>'CWebLogRoute',
                ),
                */
            ),
        ),
    ),


    // application-level parameters that can be accessed
    // using Yii::app()->params['paramName']
    'params' => array(
        // this is used in contact page
        'adminEmail' => 'webmaster@example.com',
        'ckeditor' => array(
            array(
                'Source',
            ),
            array(
                'Cut', 'Copy', 'Paste', 'PasteText', 'PasteFromWord', '-', 'Undo', 'Redo',
            ),
            array(
                'Find', 'Replace', '-', 'SelectAll', '-', 'SpellChecker', 'Scayt', 'Bold', 'Italic', 'Underline', 'Strike', 'Subscript', 'Superscript', '-', 'RemoveFormat',
                'NumberedList', 'BulletedList', '-', 'Outdent', 'Indent', '-',
            ),
//                                    '/',
            array(
                'Blockquote', 'CreateDiv', '-', 'JustifyLeft', 'JustifyCenter', 'JustifyRight', 'JustifyBlock',
            ),

            array(
                'Link', 'Unlink', 'Image', 'Table', 'HorizontalRule', 'SpecialChar', 'PageBreak',
            ),
            array(
                'Styles', 'Format', 'Font', 'FontSize',
            ),
        ),
        'ckeditor_simple' => array(
            array(
                'Bold', 'Italic', 'Underline',
            ),
        ),
    ),
);